Concurrency Components
Before you implement concurrency, it is important to understand its different components.
Cobra Concurrency Machine
You need a machine that will become the Cobra Concurrency machine.
The Cobra Concurrency machine will also run the Cobra Web Service Gateway. The PM Compass Process Server must point to the Cobra Web Service Gateway Service. You can only have one Cobra Web Service Gateway server.
Cobra Web Service
You need to host a Cobra Web Service instance to run the Cobra process. Each Cobra Web Service instance can run four processes at a time. You can run more processes at a time if more instances are hosted.
You can create as many Cobra Web Service instances as you need. Some can be created on the dedicated Cobra Process server. Some can be created on separate machines.
Cobra Web Service Gateway
Currently, the PM Compass Cobra Process Server can only connect to one instance of the Cobra Web Service, which means that the number of processes that you can run is limited to the capacity of a single instance of the Cobra Web Service. To allow the PM Compass Process Server to connect to multiple Cobra Web Service instances and expand the number of processes that you can run, you can utilize the Cobra Web Service Gateway.
The Cobra Web Service Gateway is a node that you need to set up between the PM Compass Process Server and the Cobra Web Service instances. The Cobra Web Service Gateway distributes the requests from the PM Compass Process Server to the multiple instances of the Cobra Web Service. Using the Cobra Web Service Gateway allows the Cobra Concurrency machine to run more processes.
Use the Cobra Web Service Gateway Configuration tool to identify the Cobra Web Service instances and host the Cobra Web Service Gateway on the Cobra Concurrency machine.
Cobra Web Service Gateway Service
The Cobra Web Service Gateway Service is responsible for distributing Cobra jobs to the next appropriate Cobra Web Service. The Cobra Web Service Gateway Service ensures it sends a maximum of four jobs to a single Cobra Web Service. The Cobra Web Service Gateway Service sends a job to any available service. Once a service completes a job, the Cobra Web Service Gateway Service recognizes that it is now available to receive another job.
The Cobra Web Service Gateway Service must point to one or more Cobra Web Service instances. You can host additional Cobra Web Service instances which will process Cobra-initiated jobs on multiple servers. You can create as many Cobra Web Service instances as you need on the Cobra Concurrency machine or on separate machines, including those machines with PM Compass Process Server installed. You then point the Cobra Web Service Gateway Service to the Cobra Web Service instances on these machines.
Scaling Concurrency
Each Cobra Web Service can process four jobs concurrently. You may deploy and configure multiple Cobra Web Service instances to scale the number of concurrent jobs the solution can handle. Multiple Cobra Web Service instances can be deployed on a single machine provided that the machine has sufficient resources. Each Cobra Web Service instance requires approximately two GB of available RAM to operate successfully.